var basePage = require('../../../common/BasePage');
Page({
    behaviors: [basePage],
    data: {
        goods_detail: {},
        points: 0
    },
    onLoad: function(options) {
        const { id, points } = options
        let that = this
        this.request({
            url: this.data.host + '/home/mall/detail?mall_product_id=' + id,
            loadingTip: '加载中'
        }, function(res) {
            let goods_detail= res.data;
            goods_detail.pic=that.get_thumb(goods_detail.photo,'wide');
            goods_detail.product_photo.map(function(val){
                val.pic=that.get_thumb(val.photo,'wide');
            })
            that.setData({ goods_detail })
        })
        this.setData({ points })
    }
})